import req from '../common/network'

export default {
  // 获取所有Word文章 [GET /articles]
  async list (params) {
    return await req({
      method: 'GET',
      url: '/articles',
      params,
    })
  },
  // 创建Word文章 [POST /articles/new]
  async create (data) {
    return await req({
      method: 'POST',
      url: '/articles/new',
      data,
    })
  },
  // 编辑Word文章 [PUT /articles/update]
  async update (data) {
    return await req({
      method: 'PUT',
      url: `/articles/update`,
      data,
    })
  },
 
  // 查看Word文章 [get /articles/show]
  async show (params) {
    return await req({
      method: 'GET',
      url: '/articles/show',
      params,
    })
  },
  
  // 删除Word文章 [delete /articles/delete]
  async delete (params) {
    return await req({
      method: 'delete',
      url: '/articles/delete',
      params,
    })
  },
}
